Optimal. Leaf size=43 \[ \frac{(c-d) \tan (e+f x)}{f (a \sec (e+f x)+a)}+\frac{d \tanh ^{-1}(\sin (e+f x))}{a f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.084563, antiderivative size = 43, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 29, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.103, Rules used = {3998, 3770, 3794} \[ \frac{(c-d) \tan (e+f x)}{f (a \sec (e+f x)+a)}+\frac{d \tanh ^{-1}(\sin (e+f x))}{a f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3998
Rule 3770
Rule 3794
Rubi steps
\begin{align*} \int \frac{\sec (e+f x) (c+d \sec (e+f x))}{a+a \sec (e+f x)} \, dx &=(c-d) \int \frac{\sec (e+f x)}{a+a \sec (e+f x)} \, dx+\frac{d \int \sec (e+f x) \, dx}{a}\\ &=\frac{d \tanh ^{-1}(\sin (e+f x))}{a f}+\frac{(c-d) \tan (e+f x)}{f (a+a \sec (e+f x))}\\ \end{align*}
Mathematica [B] time = 0.262645, size = 109, normalized size = 2.53 \[ \frac{2 \cos \left (\frac{1}{2} (e+f x)\right ) \left ((c-d) \sec \left (\frac{e}{2}\right ) \sin \left (\frac{f x}{2}\right )+d \cos \left (\frac{1}{2} (e+f x)\right ) \left (\log \left (\sin \left (\frac{1}{2} (e+f x)\right )+\cos \left (\frac{1}{2} (e+f x)\right )\right )-\log \left (\cos \left (\frac{1}{2} (e+f x)\right )-\sin \left (\frac{1}{2} (e+f x)\right )\right )\right )\right )}{a f (\cos (e+f x)+1)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.043, size = 78, normalized size = 1.8 \begin{align*}{\frac{c}{fa}\tan \left ({\frac{fx}{2}}+{\frac{e}{2}} \right ) }-{\frac{d}{fa}\tan \left ({\frac{fx}{2}}+{\frac{e}{2}} \right ) }-{\frac{d}{fa}\ln \left ( \tan \left ({\frac{fx}{2}}+{\frac{e}{2}} \right ) -1 \right ) }+{\frac{d}{fa}\ln \left ( \tan \left ({\frac{fx}{2}}+{\frac{e}{2}} \right ) +1 \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] time = 0.986664, size = 134, normalized size = 3.12 \begin{align*} \frac{d{\left (\frac{\log \left (\frac{\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + 1\right )}{a} - \frac{\log \left (\frac{\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - 1\right )}{a} - \frac{\sin \left (f x + e\right )}{a{\left (\cos \left (f x + e\right ) + 1\right )}}\right )} + \frac{c \sin \left (f x + e\right )}{a{\left (\cos \left (f x + e\right ) + 1\right )}}}{f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 0.476746, size = 197, normalized size = 4.58 \begin{align*} \frac{{\left (d \cos \left (f x + e\right ) + d\right )} \log \left (\sin \left (f x + e\right ) + 1\right ) -{\left (d \cos \left (f x + e\right ) + d\right )} \log \left (-\sin \left (f x + e\right ) + 1\right ) + 2 \,{\left (c - d\right )} \sin \left (f x + e\right )}{2 \,{\left (a f \cos \left (f x + e\right ) + a f\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \frac{\int \frac{c \sec{\left (e + f x \right )}}{\sec{\left (e + f x \right )} + 1}\, dx + \int \frac{d \sec ^{2}{\left (e + f x \right )}}{\sec{\left (e + f x \right )} + 1}\, dx}{a} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.2826, size = 100, normalized size = 2.33 \begin{align*} \frac{\frac{d \log \left ({\left | \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) + 1 \right |}\right )}{a} - \frac{d \log \left ({\left | \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) - 1 \right |}\right )}{a} + \frac{c \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) - d \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )}{a}}{f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]